The present invention relates to a motor-vehicle gearbox which can be used both in a double-clutch transmission and in a single-clutch transmission. More precisely, the present invention relates to a gearbox in which one of the sliding engagement sleeves is arranged to control the engagement of one gear only, i.e. to couple for rotation with a secondary shaft of the gearbox only one idle gearwheel carried by that secondary shaft and acting as a driven wheel of the gear train associated to that gear, wherein this sliding engagement sleeve is connected to a respective shift fork the translational movement of which is controlled by a double-acting hydraulic linear actuator having a plunger connected to the fork and two opposite chambers which can be alternatively connected to a fluid supply source or to a tank under control of a pair of gear shift solenoid valves, and wherein the hydraulic actuator is provided with a linear position sensor able to provide an electronic control unit with a signal indicative of the position of the plunger for feedback control of the two gear shift solenoid valves.